package me.spring.cloud.common.components.exception.exceptions;

import me.spring.cloud.common.components.rpc.response.CommonResponse;
import me.spring.cloud.common.components.util.enums.CodedEnum;
import lombok.Data;

/**
 * @author Luffy
 * @description: 业务运行异常
 * @date 2019/4/16 17:01
 */
@Data
public class BusinessException extends CodedRuntimeException {

  private static final long serialVersionUID = 7456916389026483831L;

  public BusinessException(CodedEnum code) {
    super(code);
  }

  public BusinessException(CodedEnum code, String message) {
    super(code, message);
  }

  public BusinessException(CodedEnum code, Throwable t) {
    super(code,t);
  }

  @Override
  public CommonResponse<?> handle() {
    return super.handle();
  }

  @Override
  public CommonResponse<?> handle(String message) {
    return super.handle(message);
  }
}
